﻿using System;
using System.Collections.Generic;
using System.Text;
using VT.Framework.Designer.Project;

namespace VIA.VTPlatformService
{
    public class VTProjectInfo
    {
        public string FilePath { get; set; }
        public int ProjectID { get; set; }
        public string ProjectName { get; set; }
        public List<VTFlowBlockInfo> FlowBlocks { get; set; }

        public VTProjectInfo(string path, int id)
        {
            FilePath = path;
            ProjectID = id;
        }

        public void GetProjectInfo(VTProject project)
        {
            FlowBlocks = new List<VTFlowBlockInfo>();
            ProjectName = project.ProjectName;
            for (int i = 0; i < project.FlowList.Count - 1; i++)
            {
                var flowBlockInfo = new VTFlowBlockInfo(FilePath, ProjectID, i,  project.FlowList[i].Name);
                FlowBlocks.Add(flowBlockInfo);
            }
        }
    }
}
